package leetcode.offer_two_special.binary;

/**
 * @author mazouri
 * @create 2021-09-21 12:56
 */
public class _70_singleNonDuplicate {
    public int singleNonDuplicate(int[] nums) {
        for (int i = 0; i < nums.length - 1; i += 2) {
            if (nums[i] != nums[i + 1]) return nums[i];
        }
        return nums[nums.length-1];
    }

    public static void main(String[] args) {
        System.out.println(new _70_singleNonDuplicate().singleNonDuplicate(new int[]{2}));
    }
}
